<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // new Object() 方式创建
    var a = {
        rep: 'apple'
    }
    var b = new Object(a)
    console.log(b) // {rep: "apple"}
    console.log(b.__proto__) // {}
    console.log(b.rep) // {rep: "apple"}

    // Object.create() 方式创建
    var a = {
        rep: 'apple'
    }
    var b = Object.create(a)
    console.log(b) // {}
    console.log(b.__proto__) // {rep: "apple"}
    console.log(b.rep) // {rep: "apple"}
</script>

</html>